package com.example.kafkastudy.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class KafkaConfiguration {
    @Bean
    public NewTopic topic1() {
        //指定副本个数为3，若不是集群则会报错
        return new NewTopic("test111", 3, (short)3);
    }
}
